package linke.study.spring.dao;

public class UserDao {
	
	private static volatile long sequence;
	
	public Long addUser() {
		long newId = sequence ++;
		System.out.println("admin added user, id'" + newId + "'!");
		if(Math.random() > 0.9) {
			throw new RuntimeException("oh, DB Exception!");
		}
		return newId;
	}
	
	public void removeUser(Long id) {
		System.out.println("admin removed user with id'" + id + "'!");
		return;
	}
}
